function FLogShowSquadrons () {
    var server = top.FLogGetServer ();
    server.AddNotification ("flog_overview_overview", FLogShowSquadrons);
    var data = document.getElementById ("po_flog_overview_data");
    data.firstChild.innerHTML = "";
    
    var row = document.createElement ("tr");
    data.firstChild.appendChild (row);
    row.innerHTML = "<td></td><th align=center colspan=9>Squadrons</th>";

    var row = document.createElement ("tr");
    data.firstChild.appendChild (row);
    row.innerHTML = "<th>Tile ID</th><th>Sector</th><th>Coords</th><th>Name</th><th>Owner</th><th>Owner's alliance</th><th>Faction</th><th>Squadrons</th><th>Last update</th>";
        
        
    for (key in server.data) {
        if (!server.data[key].hasOwnProperty("squadrons")) continue;
        var sq = server.data[key]["squadrons"];
        var val = server.data[key]["facility"];
        var row = document.createElement ("tr");
        data.firstChild.appendChild (row);
        if (!val) {
            row.innerHTML = "<th>"+key+"</th><td colspan=6 align=center>No basic data available</td>";
            continue;
        }
        row.innerHTML = "<th>"+key+"</th>\
                        <td align=right>"+val["sector"]+"</td>\
                        <td align=left>"+val["coords"]+"</td>\
                        <td>"+(val["name"]?val["name"]:"---")+"</td>\
                        <td>"+(val["owner"]?val["owner"]:"---")+"</td>\
                        <td>"+(val["owner_alliance"]?val["owner_alliance"]:"---")+"</td>\
                        <td>"+(val["faction"]?val["faction"]:"---")+"</td>";
        row.innerHTML += "<td>"+sq["squadrons"]+"</td>\
                        <td>"+server.LastUpdateAgo(sq["timestamp"])+"</td>";
    }
}
FLogRegisterScreen ("Squadrons", FLogShowSquadrons);